package com.piggy.logi.sys.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.piggy.logi.sys.domain.LogiSchedule;
import com.piggy.common.core.web.page.BaseMapperPlus;
import com.piggy.logi.sys.domain.LogiWaybill;
import com.piggy.logi.sys.vo.LogiScheduleExtVo;
import com.piggy.logi.sys.vo.LogiWaybillExtVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 调度车次信息Mapper接口
 *
 * @author piggy
 * @date 2023-09-06
 */
public interface LogiScheduleMapper extends BaseMapperPlus<LogiSchedule> {

    default LogiSchedule selectByScheduleNo(String scheduleNo) {
        return selectOne(Wrappers.<LogiSchedule>lambdaQuery().eq(LogiSchedule::getScheduleNo, scheduleNo));
    }

    default List<LogiSchedule> selectByCarIds(List<Long> carIds) {
        return selectList(Wrappers.<LogiSchedule>lambdaQuery().in(LogiSchedule::getCarId, carIds));
    }

    List<LogiScheduleExtVo> selectSCHList(@Param("ew") Wrapper<LogiSchedule> ew);

}
